import VueRouter from 'vue-router'
import Vue from 'vue'

Vue.use(VueRouter)

const router = new VueRouter({
  base: window.__POWERED_BY_QIANKUN__ ? '/subapp/sub-vue2/' : '/',
  mode: 'history',
  routes: [
    {
      path: '/',
      component: () => import('../pages/home.vue')
    },
    {
      path: '/about',
      component: () => import('../pages/about.vue')
    }
  ]
})

export default router
